07. Code Coverage

Code Coverage

Code Coverage

Code coverage is a measure used to find the degree to which the source code of a program is executed when the tests for that program are run. In other words, if running the tests results in 80% of the program's code being executed, then we would say that we have achieved 80% code coverage.

ND035 C04 L02 A10 Code Coverage

Quiz 2

What is code coverage?

SOLUTION: Code coverage is the percentage of code that is run by automated tests.

Quiz 3

What is a typical code coverage percentage that a developer should aim for?

SOLUTION: 80%

Task Description:

It's important to know how to use your IDE to find the code coverage of your tests. So before going further, take a few minutes and see if you can do that.

Task List:

Task Feedback:

Great!

If your code coverage is above 60-80% by this point, you're doing great!
If not, you'll want to think about how you can get it higher.